package com.pinganfu.mock.method;

import java.text.SimpleDateFormat;
import java.util.Date;

public class PerformsMethod {
	
	public String method(String method) {
			String data = "未知异常";
			if (method.equals("bakadangban_medical_card_id")) {
				Date nowTime=new Date(); 
				SimpleDateFormat time=new SimpleDateFormat("yyyyMMddHHmmSS"); 
				int random=(int)(Math.random()*10);
				int random2=(int)(Math.random()*10);
				data = (time.format(nowTime)).substring(1)+random+random2;
			}else if (method.equals("bakadangban_medical_card_no")) {
				Date nowTime=new Date(); 
					long date = new Date().getTime();
					String d = String.valueOf(date);
					int random=(int)(Math.random()*10);
					int random2=(int)(Math.random()*10);
					data = d.substring(4)+random+random2;
			}
			return data;
		}
}
